package com.mxpio.webapp.entity;

import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 服务器磁盘表
 *
 * @author: Cheng
 * @date: 2022/10/31
 */
@Entity
@Table(name = "MI_MONITOR_SERVER_DISK")
@ToString
@Data
@Schema(description = "服务器磁盘表")
public class MonitorServerDisk extends BaseEntity {

    @Id
    @Generator
    @Schema(description = "主键ID")
    @Column(name = "ID", length = 64)
    private String id;

    @Schema(description = "IP地址")
    @Column(name = "IP")
    private String ip;

    @Schema(description = "磁盘序号")
    @Column(name = "DISK_NO")
    private Integer diskNo;

    @Schema(description = "分区的盘符名称")
    @Column(name = "DEV_NAME")
    private String devName;

    @Schema(description = "分区的盘符路径")
    @Column(name = "DIR_NAME")
    private String dirName;

    @Schema(description = "磁盘类型名，比如本地硬盘、光驱、网络文件系统等")
    @Column(name = "TYPE_NAME")
    private String typeName;

    @Schema(description = "磁盘类型，比如 FAT32、NTFS")
    @Column(name = "SYS_TYPE_NAME")
    private String sysTypeName;

    @Schema(description = "磁盘总大小（单位：byte）")
    @Column(name = "TOTAL")
    private Long total;

    @Schema(description = "磁盘剩余大小（单位：byte）")
    @Column(name = "FREE")
    private Long free;

    @Schema(description = "磁盘已用大小（单位：byte）")
    @Column(name = "USED")
    private Long used;

    @Schema(description = "磁盘可用大小（单位：byte）")
    @Column(name = "AVAIL")
    private Long avail;

    @Schema(description = "磁盘资源的利用率")
    @Column(name = "USE_PERCENT")
    private Double usePercent;
}
